# Contributor: Haelwenn (lanodan) Monnier <contact+alpine@hacktivis.me>
# Maintainer: Haelwenn (lanodan) Monnier <contact+alpine@hacktivis.me>
pkgname=py3-mastodon.py
_pkgreal=Mastodon.py
pkgver=1.8.1
pkgrel=2
pkgdesc="Python wrapper for the Mastodon API"
url="https://github.com/halcy/Mastodon.py"
arch="noarch"
license="MIT"
depends="python3 py3-requests py3-dateutil py3-six py3-magic py3-decorator py3-http-ece py3-cryptography py3-blurhash"
checkdepends="python3-dev py3-pytest py3-pytest-runner py3-pytest-cov py3-vcrpy py3-pytest-vcr py3-pytest-mock py3-requests-mock py3-tz tzdata"
makedepends="py3-setuptools"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgreal:0:1}/$_pkgreal/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
options="!check" # vcrpy needs urrlib3-2 support

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install \
		--prefix=/usr \
		--root="$pkgdir" \
		--single-version-externally-managed
}

sha512sums="
812bfdcb1a59a06376bfb48798b43cac9dc9390781b3949e4b3d751ec0530b25b187e688c7cfc18eff6d5bb23c9bf442bce5f6902727331e8bc550e310dab94c  Mastodon.py-1.8.1.tar.gz
"
